<?php

require_once("View/LoginView.php");
require_once("Model/LoginHandler.php");
require_once("Controller/LoginController.php");

//Skapar instanser
$lc = new LoginController();
$lh = new LoginHandler();
$lw = new LoginView();

//Variablar
$body = $lc->DoControll();

//Kollar om anv är inloggad
$userStatus = $lh->IsLoggedIn();

	if($userStatus == TRUE)
	{
		$msg= "</br>Inloggad";
		$lw->DidUserRemember();
		$body .= $lw->DoLogoutBox();
	}
	else
	{
		$msg = "</br>Utloggad";
		$body .= $lw->DoLoginBox();
	}
	
$body .= $msg;

?>

<!doctype html> 
	<html>
		<head>
			<meta charset="UTF-8">
			<title></title>
		</head>	
		
		<body>
			<header>	
			</header>
			
				<div id="content">	
					<?php echo $body; ?>
				</div>
			
			<footer>
				
			</footer>
			
		</body>
		
	</html>